#pragma once

#include <vector>
#include <MyControls/ProgressDlg.h>
#include "Types.h"
#include "Renderer.h"
#include "Paint.h"
#include "irender/writer.h"

typedef std::vector<PaintingKeySPtr> PaintingKeyVector;

class CXComp;

class ImageRenderer : public Renderer
{
public:
	ImageRenderer(CXComp & Comp) : Renderer(Comp) { }
	void Perform();
private:
	void PreparePaintingKeys();
	virtual ~ImageRenderer() { if (created()) wait_finish(); }
private: //mswin::thread interface
	virtual void run();
private:
	My::ProgressDlg m_Progress;
	irender::writer_aptr m_Writer;
	PaintingKeyVector m_PaintingKeys;
};
